<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="vue.js"></script>
    <title>Document</title>
    <style>
        .tab{
            width: 600px;
            border: 1px solid #000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 20px;
            background-color: aqua;
            
        }
        .tab div{
            margin: 0 10px;
            background-color: aqua;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="tab">
            <div><a href="#" @click="showDiv=1" :class="{'select':showDiv===1}">html</a></div>
            <div><a href="#" @click="showDiv=2" :class="{'select':showDiv===2}">css</a></div>
           <div><a href="#" @click="showDiv=3" :class="{'select':showDiv===3}">javascript</a></div>
            <div><a href="#" @click="showDiv=4" :class="{'select':showDiv===4}">vue</a></div>
        </div>
        <div class="tabConten" v-show="showDiv===1">
            <h1>html</h1>
        </div>
        <div class="tabConten" v-show="showDiv===2">
            <h1>css</h1>
        </div>
        <div class="tabConten" v-show="showDiv===3">
            <h1>javascript</h1>
        </div>
        <div class="tabConten" v-show="showDiv===4">
            <h1>vue</h1>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: "#app",
        data: {
            showDiv: 1,
        }
    })
</script>

</body>

</html>